package com.fx.zmlzml.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fx.zmlzml.entity.PcGpu;
import com.fx.zmlzml.mapper.PcGpuMapper;
import com.fx.zmlzml.service.PcGpuService;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 电脑显卡服务实现类
 */
@Service
@Slf4j
public class PcGpuServiceImpl extends ServiceImpl<PcGpuMapper, PcGpu> implements PcGpuService {

    private static final Logger logger = LoggerFactory.getLogger(PcGpuServiceImpl.class);

    @Override
    public List<PcGpu> getListByParams(Integer maxPrice, Integer minPrice) {
        logger.info("查询所有显卡列表，查询条件: maxPrice={}, minPrice={}", maxPrice, minPrice);
        List<PcGpu> list = baseMapper.getListByParams(maxPrice, minPrice);
        logger.info("显卡总条数：{}", list.size());
        return list;
    }
}